package com.jeecms.wicool.manager.car.impl;




import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeecms.cms.entity.main.CmsUser;
import com.jeecms.common.page.Pagination;
import com.jeecms.wicool.dao.car.CarOrderAppraiseDao;
import com.jeecms.wicool.entity.car.CarOrderAppraise;
import com.jeecms.wicool.manager.car.CarOrderAppraiseMng;

@Service
@Transactional
public class CarOrderAppraiseMngImpl implements CarOrderAppraiseMng {
	
	private CarOrderAppraiseDao dao;
	@Autowired
	public void setDao(CarOrderAppraiseDao dao) {
		this.dao = dao;
	}
	
	@Transactional(readOnly = true)
	public Pagination getPage(Integer userId,Integer orderId,Short grade,int pageNo, int pageSize,CmsUser user) {
		Pagination page = dao.getPage(userId, orderId, grade, pageNo, pageSize, user);
		return page;
	}
	@Override
	public CarOrderAppraise findById(Integer id) {
		CarOrderAppraise entity = dao.findById(id);
		return entity;
	}

	@Override
	public CarOrderAppraise deleteById(Integer id) {
		CarOrderAppraise bean = dao.deleteById(id);
		return bean;
	}

	@Override
	public CarOrderAppraise findByOrderId(Integer orderId) {
		// TODO Auto-generated method stub
		return dao.findByOrderId(orderId);
	}
}